package ua.soso.service.bean;

import ua.soso.dao.model.File;

/**
 * Created by Babka Aleksey
 * Date: 04.05.12
 */
public class FileBean {
    private Long id;
    private String name;
    private String description;
    private String category;
    private String user;
    private boolean isPublic;

    public FileBean() {
    }

    public FileBean(File file) {
        this.id = file.getId();
        this.name = file.getFileName();
        this.description = file.getDescription();
        this.category = file.getCategory().getName();
        this.user = file.getUser().getLogin();
        this.isPublic = file.isPublished();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public boolean isPublic() {
        return isPublic;
    }

    public void setPublic(boolean aPublic) {
        isPublic = aPublic;
    }
}
